
<script type="text/javascript">
screen_width = screen.width
screen_height = screen.height
   function c(){
   	   setInterval(function(){
	   	   if(typeof nw == 'undefined'){
		   	 // window.open('http://baidu.com')
		   	 alert("browser")
		   }else{

		   	 nw.Window.open('http://dev.com:3000/main/pop',
		   	 	{
		   	 		width: 400,
		   	 		height: 300,
		   	 		x: screen_width - 400,
		   	 		y: screen_height,
		   	 		frame: false
		   	 	},function(new_win){
		   	 		new_win.moveTo(screen_width - 400, screen_height - 300)
		   	 	setTimeout(function(){
		   	 		new_win.close()
		   	 	},2000)
		   	 })
		   }	
		},3500)
	   
	}
</script>

<h1>Main#index</h1>
<p>Find me in app/views/main/index.html.erb

<button id="c" onclick="c()">Click</button>
</p>
